package pnu.ssm.appinfo;


public class AppInfo{
	
	public static final String TAG = "AppInfo";
	private String appName;
    private String packageName;
    private boolean check;
    private boolean changed;
    
	public AppInfo(String appName, String packName) {
		this(appName, packName, false);
	}
	
	public AppInfo(String appName, String packName, boolean forbidden) {
		this.appName = appName;
		this.packageName = packName;
		this.check = forbidden;
		this.changed = false;
	}
    
    // set methods
    public void setAppName(String appname){
    	this.appName = appname;
    }
    
    public void setPackageName(String pname){
    	this.packageName = pname;
    }
    
    public void setCheck(boolean check) {
    	this.check = check;
    }
    
    public void setChanged(boolean changed){
    	this.changed = changed;
    }
    
    // get methods
    public String getAppName(){
    	return appName;
    }
    
    public String getPackageName(){
    	return packageName;
    }
    
    // is methods
    public boolean isCheck() {
		return check;
	}
    
    public boolean isChanged(){
    		return changed;
    }
    
    @Override
    public boolean equals(Object o) {
    		AppInfo info = (AppInfo)o;
    		return this.appName.contains(info.appName) || this.appName.contains(info.packageName);
    }
}

